/*
 * Copyright 2008 Neil Bacon
 * Distributed under the terms of the Mozilla Public License version 1.1
 * or the GNU General Public License version 3.
 */

package nb.ref;

/**
 * A Soft or Weak Reference that uses the referent object's {@link #hashCode()} and {@link #equals(Object)}.
 * @param <V>
 */
public interface HashableReference<V> {

    V get();

    /**
     * @return true only if same object or both referents are non-null and equal.
     */
    boolean equals(Object obj);

    int hashCode();
}
